<div class="wrapper wrapper-content animated fadeInRight">
    <!-- PAGE CONTENT BEGINS -->
    <div class="row">
        <div class="col-xs-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>搜索</h5>
                </div>
                <div class="ibox-content">
                    <div class="row">

                        <div class="table-responsive">
                            <!--这里是放搜索的-->

                            <form class="form-search" method="get"  action="" role="form">
                                <table>
                                    <tr>
                                        <td>开始时间<input name="bg_time" class="form-control layer-date" id="bg_time"  value="<?=$search['bg_date']?>" type="text"  onclick="laydate({istime: false, format: 'YYYY-MM-DD'})" placeholder="输入开始时间"  style=" width:200px"/></td>
                                        <td>结束时间<input name="end_time" class="form-control layer-date"  id="end_time"  value="<?=$search['end_date']?>" type="text"  onclick="laydate({istime: false, format: 'YYYY-MM-DD'})" placeholder="输入结束时间"  style=" width:200px"/></td>
                                        <td>
                                            <div class="input-group">
                                                <button type="submit" style="margin-top: 42%"
                                                        class="btn form-control btn-sm btn-primary">
                                                    搜索
                                                </button>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div id="baobiao" >
                <div id="main" style="width: 100%;height:700px; float: left"></div>
            </div>
            <!--这里是放table的-->
        </div>
    </div>
</div>
<script src="/public/admin/js/echarts.min.js"></script>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));
    // 指定图表的配置项和数据
    var date = '<?php echo $data["date"] ?>';
    date= date.split(",");
    var views = '<?php echo $data["num"] ?>';
    views= views.split(",");
    option = {
        title: {
            text: '新增商家',
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data:['新增商家']
        },
        toolbox: {
            show: true,
            feature: {
                dataZoom: {
                    yAxisIndex: 'none'
                },
                dataView: {readOnly: false},
                magicType: {type: ['line', 'bar']},
                restore: {},
                saveAsImage: {}
            }
        },
        xAxis:  {
            type: 'category',
            boundaryGap: false,
            data: date,
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                formatter: '{value} '
            }
        },
        series: [
            {
                name:'新增商家',
                type:'line',
                data:views,
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'},
                        {type: 'sum', name : '总值'}
                    ]
                },
                markLine: {
                    data: [
                        {type: 'average', name: '平均值'}
                    ]
                }
            },
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>